<HTML>
<head>
<title>AngelScript: Reference: Calling conventions</title>
<LINK rel="stylesheet" type="text/css" href="style.css">
</head>

<body>

<p>
<a href="../index.html">index</a>
</p>

<h1>Reference: Calling conventions</h1>

<pre class=border>
<a href="#generic">asCALL_GENERIC</a>
<a href="#cdecl">asCALL_CDECL</a>
<a href="#stdcall">asCALL_STDCALL</a>
<a href="#thiscall">asCALL_THISCALL</a>
<a href="#cobjlast">asCALL_CDECL_OBJLAST</a>
<a href="#cobjfirst">asCALL_CDECL_OBJFIRST</a>
</pre>


<a name="generic"></a>
<h2>asCALL_GENERIC</h2>

<p>This is a special calling convention that interact more closely with the library. It can be used both for global functions and class methods.</p>

<p>The function signature for this calling convention is <code>void __cdecl func(asIScriptGeneric *gen);</code>.</p>

<p>When the function is called, it can use the asIScriptGeneric methods to retrieve the arguments, object pointer, and set the return value directly on the context's stack.</p>





<a name="cdecl"></a>
<h2>asCALL_CDECL</h2>

<p>The function is a global function declared with the __cdecl calling conventions.</p>



<a name="stdcall"></a>
<h2>asCALL_STDCALL</h2>

<p>The function is a global function declared with the __stdcall calling conventions.</p>



<a name="thiscall"></a>
<h2>asCALL_THISCALL</h2>

<p>The function is an object method.</p>




<a name="cobjlast"></a>
<h2>asCALL_CDECL_OBJLAST</h2>

<p>The function is a normal CDecl function that takes a pointer or reference to an object as the last parameter. Using this calling convention applications can register global functions as object methods.</p>




<a name="cobjfirst"></a>
<h2>asCALL_CDECL_OBJFIRST</h2>

<p>The function is a normal CDecl function that takes a pointer or reference to an object as the first parameter. Using this calling convention applications can register global functions as object methods.</p>





<p><a href="#">top</a></p>

</body></HTML>